
#ifndef _ICOMBOBOARD_H_
#define _ICOMBOBOARD_H_

#include <BImage>
#include <BComboBox>
#include <BScrollArea>

namespace BWE
{
	class member_BComboBox;
	class IComboBoard : public BScrollArea
	{
	public:
		IComboBoard(member_BComboBox& com_member, BComboBox* parent);
		~IComboBoard();

		void freshItemRects();

	protected:
		virtual void scrollArea();

	protected:
		virtual void showEvent(const BEvent& showEvent);
		virtual void hideEvent(const BEvent& event);

		virtual void styleEvent(const BEvent& event);
		virtual void freshEvent(const BEvent& event);
		virtual void paintEvent(const BEvent& event);

		virtual void activeEvent(const BActiveEvent& activeEvent);
		virtual void focusEvent(const BFocusEvent& focusEvent);

		virtual void keyDownEvent(const BKeyEvent& keyEvent);

		virtual void mouseEnterEvent(const BMouseEvent& mouseEvent);
		virtual void mouseLeaveEvent(const BMouseEvent& mouseEvent);

		virtual void mouseClickEvent(const BMouseEvent& mouseEvent);
		virtual void mouseMoveEvent(const BMouseEvent& mouseEvent);

	public:
		BComboBox*			combox;
		member_BComboBox&	member;

		bool				dirty;
		int					hoveredIndex;
		int					pressedIndex;
		BSize				totalSize;
		int					showBegin;
		int					showCount;
	};
}
#endif
